<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<!-- saved from url=(0019)http://guajibao.me/ -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>不关机的云端电脑</title>
    <link rel="icon" type="image/x-icon" mce_href="/favicon.ico" href="image/favicon.ico">
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="css/bootstrap-docs.min.css">
    <!--[if lt IE 8]>
    <link rel="stylesheet" href="css/bootstrap-ie7.css">
    <![endif]-->

    <link rel="stylesheet" href="bootstrap/plugin/bootstrap3-dialog/css/bootstrap-dialog.min.css
    "/>

    <script src="js/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>

    <![endif]-->
    <script src="js/bootstrap.js" type="text/javascript"></script>
    <script type="text/javascript"
            src="bootstrap/plugin/bootstrap3-dialog/js/bootstrap-dialog.min.js"></script>

    <script type="text/javascript" src="bootstrap/plugin/jquery-dataTables/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="bootstrap/plugin/jquery-dataTables/dataTables.bootstrap.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#example').DataTable( {
                "lengthMenu": [[30, 50,  -1], [30, 100,  "All"]]
            });
        });
    </script>
</head>

<body data-spy="scroll" data-target="#myScrollspy">

<div>
    <nav class="navbar-l1 navbar-default navbar-static-top" role="navigation" style="background-color:#008eb7;"
         onmouseover="javascript:$('#navbar-brand').css('color','#fff');"
         onmouseout="javascript:$('#navbar-brand').css('color','#00a2ca');">
        <div class="container-fluid">
            <div class="navbar-header">
                <a id="navbar-brand" class="navbar-brand" style="" href="/">vpsb2c.com</a>
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-navbar-collapse-1"><span class="sr-only">Toggle navigation</span><span
                        class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
            </div>
            <div class="collapse navbar-collapse" id="bs-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li><a style="" href="/profile" title="当前用户：jiaoming42">您好，${loginedUser.nickname}</a></li>
                    <li></li>
                    <li></li>
                    <li><a style="" href="/logout" title="退出系统"><span
                            class="glyphicon glyphicon-log-out"></span>退出系统</a></li>

                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
    <nav class="navbar-l2 navbar-default navbar-static-top" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-navbar-collapse-2"><span class="sr-only">Toggle navigation</span><span
                        class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
            </div>
            <div class="collapse navbar-collapse" id="bs-navbar-collapse-2">
                <ul class="nav navbar-nav">
                    <c:choose>
                        <c:when test="${loginedUser.role == 0}">
                            <li class="active"><a style="padding-left:20px;padding-right:20px;" href="/">我的</a></li>
                        </c:when>
                        <c:otherwise>
                            <li><a style="padding-left:20px;padding-right:20px;" href="/">我的</a></li>
                            <%--<li><a style="padding-left:20px;padding-right:20px;"--%>
                                   <%--href="/recordVps">VPS登记</a></li>--%>
                            <li><a style="padding-left:20px;padding-right:20px;" href="/userList">用户列表</a></li>
                            <li><a style="padding-left:20px;padding-right:20px;" href="/hostList">主机</a>
                            </li>
                            <li class="active"><a style="padding-left:20px;padding-right:20px;" href="/income">流水</a>
                            </li>
                            <c:if test="${loginedUser.role == 2}">
                                <li><a style="padding-left:20px;padding-right:20px;" href="/admin">设置管理员</a></li>
                            </c:if>
                        </c:otherwise>
                    </c:choose>


                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
    <div class="container-fluid">
        <div >
            <div class="page-header">
                <h4>流水总计</h4>
            </div>
            <div  class="dataTables_wrapper form-inline dt-bootstrap">

                <div class="row">
                    <div class="col-sm-12">
                        <table  class="table table-striped table-bordered dataTable" cellspacing="0"
                               width="100%" role="grid" aria-describedby="example_info" style="width: 100%;">
                            <thead>
                            <tr role="row">
                                <th class="sorting_asc" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-sort="ascending" aria-label="Name: activate to sort column descending"
                                    style="width: 87px;">姓名
                                </th>

                                <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-label="Position: activate to sort column ascending" style="width: 141px;">总计
                                </th>



                            </tr>
                            </thead>

                            <tfoot>

                            </tfoot>

                            <tbody>
                            <c:forEach items="${incomeTotalVoList}" var="incomeTotalVo">

                                <tr role="row" class="odd">
                                    <td class="sorting_1">${incomeTotalVo.nickname}</td>
                                    <td>${incomeTotalVo.rmb}</td>
                                </tr>
                            </c:forEach>

                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
        </div>
        <div>
            <div class="page-header">
                <h4>流水详细</h4>
            </div>
            <div id="example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">

                <div class="row">
                    <div class="col-sm-12">
                        <table id="example" class="table table-striped table-bordered dataTable" cellspacing="0"
                               width="100%" role="grid" aria-describedby="example_info" style="width: 100%;">
                            <thead>
                            <tr role="row">
                                <th class="sorting_asc" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-sort="ascending" aria-label="Name: activate to sort column descending"
                                    style="width: 87px;">购买人
                                </th>

                                <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-label="Position: activate to sort column ascending" style="width: 141px;">VPS
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-label="Position: activate to sort column ascending" style="width: 141px;">购买金额
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-label="Office: activate to sort column ascending" style="width: 62px;">购买时间
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-label="Office: activate to sort column ascending" style="width: 62px;">操作代码
                                </th>
                                <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1"
                                    aria-label="Office: activate to sort column ascending" style="width: 62px;">操作人
                                </th>


                            </tr>
                            </thead>

                            <tfoot>

                            </tfoot>

                            <tbody>
                            <c:forEach items="${vpsBuyRecordList}" var="vpsBuyRecord">

                                <tr role="row" class="odd">
                                    <td class="sorting_1">${vpsBuyRecord.customer.nickname}</td>
                                    <td>${vpsBuyRecord.vps.vmName}</td>
                                    <td>${vpsBuyRecord.rmb}</td>
                                    <td>${vpsBuyRecord.createTime}</td>
                                    <td>${vpsBuyRecord.operatorCode}</td>
                                    <td>${vpsBuyRecord.seller.nickname}</td>

                                </tr>
                            </c:forEach>

                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
</body>
</html>
